﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Role_View.aspx.cs" Inherits="SysManage_Role_View" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>展示角色</title>
    <base target ="_self" />
    <link rel="stylesheet" href ="../css/css.css" type="text/css" />
    <!--#include file="../JS/TrimData.js"--> 
</head>
<body>
    <form id="form1" runat="server" method ="post" >
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="15%" height="18" valign="top" background="../images/tablelb.gif" class="font13"> 
      <div align="left"><IMG height=18 src="../images/tablelbleft.gif" width=18></div></td>
    <td width="2%" valign="top" background="../images/tablelb.gif" bgcolor="#ffffff" class="font13"> 
      <div align="right"><IMG height=18 src="../images/tablelbright.gif" width=12></div></td>
    <td colspan="2" valign="center" bgcolor="#ffffff" class="font13"> <div align="right"> 
      </div></td>
  </tr>
  <tr> 
    <td height="26" colspan="2" valign="center" bgcolor="#e9ecf5" class="font13"> 
      <div align="center">角色管理</div></td>
    <td width="80%" height="26" valign="bottom" background="../images/tddi.gif" class="font13"> 
      <div align="right"> </div></td>
    <td width="3%" valign="top" background="../images/tddi.gif" class="font13"> 
      <div align="right"><IMG height=26 src="../images/tddir.gif"></div></td>
  </tr>
</table>

<table width="98%" height="107" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#e9ecf5">
  <tr> 
    <td height="147"  valign="top"> 
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tablelsdi">
          <tr> 
            <td width="4%" background="../images/tablelb01.gif"><img src="../images/tablelb01-left.gif" width="21" height="22"></td>
            <td width="82%" background="../images/tablelb01.gif" class="font12w">角色展示</td>
            <td width="14%" background="../images/tablelb01.gif"> <div align="right"><img src="../images/tablelb01-right.gif" width="21" height="22"></div></td>
          </tr>
        </table>
      <input type="hidden" id="PCount" />
          <input type="hidden" id="BCount" />
          <input type="hidden" id="OrRoleCode" runat ="server" />
          <input type="hidden" id="OrRoleName" runat ="server" />
          <input type="hidden" id="hidPageIDList" runat ="server"  />
          <input type="hidden" id="hidBtnIDList" runat ="server"  />
          <input type="hidden" id="hidEditType" runat ="server" />        
     <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tablelb">
      <tr>
        <td width="20%" bgcolor="#E1EEFD" class="tableleft" align ="right" >角色代码&nbsp;</td><td bgcolor="#E1EEFD" class="tableleft"><asp:Label ID="RoleCode" runat ="server" >&nbsp;</asp:Label></td>
      </tr>
      <tr>
        <td bgcolor="#ECF4FD" class="tableleft"  align ="right">角色名称&nbsp;</td><td bgcolor="#ECF4FD" class="tableleft"><asp:Label ID="RoleName" runat = "server" >&nbsp;</asp:Label></td>
      </tr>
      <tr>
        <td bgcolor="#E1EEFD" class="tableleft" align ="right">角色描述&nbsp;</td><td bgcolor="#E1EEFD" class="tableleft"><asp:Label ID="Descr" runat ="server" >&nbsp;</asp:Label></td>
      </tr>
      <tr>
        <td bgcolor="#ECF4FD" class="tableleft"  align ="right">是否有效&nbsp;</td><td bgcolor="#ECF4FD" class="tableleft"><asp:Label ID="Effective" runat ="server" >&nbsp;</asp:Label></td>
      </tr>
      <tr>
        <td valign ="top" bgcolor="#E1EEFD" class="tableleft" align ="right">&nbsp;&nbsp;&nbsp;&nbsp;授权项&nbsp;</td><td bgcolor="#E1EEFD" class="tableleft"><%=sHtml%></td>
      </tr>
      </table>
      <table  width="98%" border="0" cellpadding="0" cellspacing="0" align="center" >
       <tr>
        <td width="20%"></td>
        <td><label id="Lback"  accesskey ="c"  onclick ="window.close();" >&nbsp;&nbsp;<b>返回</b> </label>
        </td>
      </tr>
    </table> 
   </td>
  </tr>
 </table>    
    </form>
    <script language ="javascript" type="text/javascript" >
    <!--
      var sData = dialogArguments;
      form1.hidEditType.value = sData.stype ;
      if(sData.stype == "4")  // 2 修改 1 新建
      {
        var sobj = sData.RoleForm.Hcode.value;
        var ary=sobj.split('|');
        window.document.all.RoleCode.innerText = trim(ary[0]);
        window.document.all.RoleName.innerText = trim(ary[1]);
        window.document.all.Descr.innerText = trim(ary[2]);
        var sEffective ="";
         if(trim(ary[3]) == "1")
         {
           sEffective = "是";
         }
         else if(trim(ary[3]) == "0")
         {
           sEffective = "否";
         }
        window.document.all.Effective.innerText = sEffective;
        
        //选中已授权按钮  
        var sStr= trim(ary[4]);
        var ary=sStr.split('~');
        var nGrantCount=ary.length;  //授权个数
        var nPCount = form1.PCount.value;   //页面数
        var BtnCount = form1.BCount.value;  //按钮数
      
        for(j=0;j<nGrantCount-1;j++)  //总个数
        {
          var nary = ary[j];
          var ary1 = nary.split('.');  //第J个页面
          var GrantPageID = ary1[0];     //页面ID
          var GrantBtnID  = ary1[1];     //按钮ID集合
          //alert(sStr);
          //alert(nary);
          //alert(GrantPageID);
          //alert(GrantBtnID);
          for(i=0;i<nPCount;i++)         //页面授权信息
          {
            var sStr2 = form1.chkPage[i].value;
            //var ary2 = sStr2.split('^');
            if(GrantPageID==sStr2)
            {
              form1.chkPage[i].checked=true;
            }
          }
        
        
          var ary2 =GrantBtnID.split('^');
          var nGrantBtnID = ary2.length;
          for(l=0;l<nGrantBtnID-1;l++)
          {
             for(k=0;k<BtnCount;k++)         //按钮授权信息
             {
               var sStr2 = form1.chkBtn[k].value;
               var ary3 = sStr2.split('.');
               if(ary2[l]==ary3[1] && GrantPageID == ary3[0])
               {
                 form1.chkBtn[k].checked=true;
               }
             }            
          }
        }
      }      
   -->
  </script>
</body>
</html>
